package cn.xinzhi.until;

import cn.xinzhi.entity.UserInfo;

import java.util.ArrayList;
import java.util.List;

public class PageUtil {
    private Integer index = 1;
    private Integer pageSize = 3;
    private Integer totalCount;
    private Integer pageTotalCount;

    private List<UserInfo> uis = new ArrayList<UserInfo>();

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getPageTotalCount() {
        return totalCount % pageSize == 0 ? totalCount/pageSize : totalCount / pageSize + 1;
    }


    public List<UserInfo> getUis() {
        return uis;
    }

    public void setUis(List<UserInfo> uis) {
        this.uis = uis;
    }
}
